<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('check表格页')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "goods/goods";
        var datas = [[${@dict.getType('sys_normal_disable')}]];

        $(function() {
            var options = {
                url: prefix + "/list",
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
                columns: [{
		            radio: true
		        },
				{
					field: 'barCode',
					title: '条码'
				},
				{
					field: 'brand',
					title: '品牌'
				},
				{
					field: 'size',
					title: '尺码'
				},
				{
					field: 'size2',
					title: '尺码'
				},
				{
					field: 'styleNumber',
					title: '款号'
				},
				{
					field: 'retailPrice',
					title: '零售价'
				},
				{
					field: 'primeCost',
					title: '进价'
				},
				{
					field: 'fabricContent',
					title: '面料成分'
				},
				{
					field: 'unit',
					title: '单位'
				},
				{
					field: 'name',
					title: '商品名称'
				}]
            };
            $.table.init(options);
        });
        
        /* 添加用户-选择用户-提交 */
		function submitHandler() {
			var rows = $.table.selectFirstColumns();
			if (rows.length == 0) {
       			$.modal.alertWarning("请至少选择一条记录");
       			return;
       		}
			console.log(rows.join());
			window.parent.checkTarget(rows.join());
		}
    </script>
</body>
</html>